package User;

import Books.BooksList;
import IOPerations.*;

import java.util.Scanner;

public class UserNormal extends User{

    public UserNormal(String name) {
        super(name);
        this.iOperations = new IOperations[]{
                new ExitOperations(),
                new FindOperations(),
                new BorrorOperations(),
                new AlsoOperations(),
        };
    }

    public void doOperations(int val, BooksList bookslist){
        iOperations[val].work(bookslist);

    }

    @Override
    public int meun() {
        System.out.println("======普通用户菜单======");
        System.out.println("1.查找图书");
        System.out.println("2.借阅图书");
        System.out.println("4.归还图书");
        System.out.println("0.退出系统");
        System.out.println("====================");
        Scanner scanner = new Scanner(System.in);
        int cmp = scanner.nextInt();

        return cmp;
    }
}
